package cn.mall.product.web;

import cn.mall.product.service.SkuInfoService;
import cn.mall.common.vo.SkuItemsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class SkuItemsController {
    @Autowired
    private SkuInfoService infoService;
    @ResponseBody
    @GetMapping(value = "/items")
    public List<SkuItemsVo> getAllItems(){
        return infoService.skuItems();

    }


}
